package Student;

public class Student {
    private String stuName; // 成员变量
    // 学生年龄
    private int stuAge;
    // 学号
    private String stuNo;
    // 学校
    private String stuSchool;

    public Student(String stuName,int stuAge,String stuNo,String stuSchool){
        this.stuName=stuName;
        this.stuAge=stuAge;
        this.stuNo=stuNo;
        this.stuSchool=stuSchool;
        System.out.println("执行了一个带参数的构造函数");
    }

    public Student(){
        System.out.println("执行了一个默认的构造方法");
    }

    public void doStuding() {
        System.out.println(this.stuName + " is studing...");
    }

    /**
     * 吃早餐行为
     *
     * @param foodName 早餐名
     * @param money    花费的钱
     */
    public void doEating(String foodName, double money) {
        System.out.println(this.stuName + " is eating " + foodName + " with ￥" + money);
    }

    /**
     * 考试行为
     *
     * @param examName 考试科目(形参)
     */
    public double doExaming(String examName) {
        System.out.println(this.stuName + " is examing " + examName);
        double score = 90.5;
        // 返回结果
        return score;
    }


    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public String getStuNo() {
        return stuNo;
    }

    public void setStuNo(String stuNo) {
        this.stuNo = stuNo;
    }

    public String getStuSchool() {
        return stuSchool;
    }

    public void setStuSchool(String stuSchool) {
        this.stuSchool = stuSchool;
    }
}
